export default {
	methods:{
		/**
		 * 登录后去指定页面
		 */
		userToPage(url='',type='navigateTo'){
			const userinfo = uni.getStorageSync('userinfo');
			const token = uni.getStorageSync('token');
			if(userinfo.id && token) {
				uni[type]({url});
			}else{
				uni.showToast({
					title: '请登录后操作',
					icon: 'none'
				});
				setTimeout(()=>{
					uni.navigateTo({
						url:'/pagesuser/public/login'
					});	
				},1000);
			}
		}
	}
};